package com.ct.ecommerce.framework.exception;

import com.ct.ecommerce.framework.enums.ECommerceCodeEnum;
import lombok.extern.slf4j.Slf4j;


/**
 * 异常抛出类
 * @author changtong
 * @date 2021-50-20
 */
@Slf4j
public final class CastException {

    private CastException() {
    }

    public static void cast(ECommerceCodeEnum code) {
        log.error(code.toString());
        throw new CustomerException(code);
    }
}
